BASE_DIR = ../ManualExamples


compile: profiler.cpp
	make -C cachesim
	g++ -c -Wall -Wno-unknown-pragmas -O3 -fomit-frame-pointer -DBIGARRAY_MULTIPLIER=1 -DUSING_XED -fno-strict-aliasing -I$(BASE_DIR)/../Include -I$(BASE_DIR)/../InstLib -I$(BASE_DIR)/../../../extras/xed2-ia32/include -I$(BASE_DIR)/../../../extras/components/include -I$(BASE_DIR)/../../../source/include -I$(BASE_DIR)/../../../source/include/gen -fno-stack-protector -DTARGET_IA32 -DHOST_IA32 -DTARGET_LINUX -O3 -fomit-frame-pointer -o profiler.o profiler.cpp
	g++ -Wl,-rpath=$(BASE_DIR)/../../../ia32/runtime/cpplibs -Wl,--hash-style=sysv -shared -Wl,-Bsymbolic -Wl,--version-script=$(BASE_DIR)/../../../source/include/pintool.ver -L$(BASE_DIR)/../Lib/ -L$(BASE_DIR)/../ExtLib/ -L$(BASE_DIR)/../../../ia32/runtime/cpplibs -L$(BASE_DIR)/../../../extras/xed2-ia32/lib -L$(BASE_DIR)/../../../ia32/lib -L$(BASE_DIR)/../../../ia32/lib-ext -o profiler.so profiler.o cachesim/*.o -L$(BASE_DIR)/../Lib/ -L$(BASE_DIR)/../ExtLib/ -L$(BASE_DIR)/../../../ia32/runtime/cpplibs -L$(BASE_DIR)/../../../extras/xed2-ia32/lib -L$(BASE_DIR)/../../../ia32/lib -L$(BASE_DIR)/../../../ia32/lib-ext -lpin -lxed -ldwarf -lelf -ldl

clean:
	rm *.so *.o
